package util

//切片长度与容量是可变的、数组相反，数组是值引用、切片是地址引用

/*
*
二维切片换为一维切片
*/
func merge[T any](obj [][]T) ([]T, int) {
	target := make([]T, len(obj))
	for _, strings := range obj {
		for _, s := range strings {
			target = append(target, s)
		}
	}
	return target, len(target)
}
